CREATE TABLE Smart_datos_maestros
(
	sm_scdatmaestro INTEGER NOT NULL AUTO_INCREMENT,
	sm_codatmaestro VARCHAR(20) NOT NULL,
	sm_dsdatmaestro VARCHAR(150) NOT NULL,
	sm_dsvalor VARCHAR(50) NOT NULL,
	sm_scmaestro INTEGER NOT NULL,
	sm_fhingreso DATE NOT NULL,
	sm_fhmodificacion DATE NOT NULL,
	sm_fhretiro DATE,
	sm_cousuario VARCHAR(150) NOT NULL,
	PRIMARY KEY (sm_scdatmaestro),
	KEY (sm_scmaestro)
) 
;


ALTER TABLE Smart_datos_maestros ADD CONSTRAINT FK_Smart_datos_maestros_Smart_maestros 
	FOREIGN KEY (sm_scmaestro) REFERENCES Smart_maestros (sm_scmaestro)
;

